export const eventData = [
    {
        id: '126991329',
        cost_rule: '1小时起订，3000元/小时',
        type: '核磁共振仪',
        source: '设备',
        source_id: '8138130123',
        time: '2小时',
        cost_total: '6000元',
        priority: 2,
        created_time: '2018-03-15 15:08:48',
        updated_time: '2018-03-15 15:08:48',
        client_id: '00:1A:1E:02:F5:70',
        phone: '13881340123',
        location: '门诊楼4楼',
        plugin_id: 'P12136',
        plugin_name: '00:1A:1E:02:F5:70',
        controller_id: '00:1A:1E:02:F5:70',
        controller_name: 'SLR01-WiFi-08a',
        status: '已支付',
        owner: '测试人员'
    }
];

export const eventColumns = [
    {
        'title': '编号',
        'key': 'id',
        width: 120,
    },
    {
        'title': '状态',
        'key': 'status',
        width: 120,
        filters: [
            {
                label: '已支付',
                value: '已支付'
            },
            {
                label: '未支付',
                value: '未支付'
            }
        ],
        filterMultiple: false,
        filterMethod(value, row) {
            return row.status === value;
        },
        render: (h, params) => {
            return h('Tag', {
                props:
                    { color: params.row.status === '已支付' ? 'green' : 'red', type: 'border' }
            }, params.row.status);
        }
    },
    {
        'title': '设备ID',
        'key': 'source_id',
        'width': 160,
        render(h, params) {
            return h('a', { domProps: { href: `#/data/data-hospital?id=${params.row.source_id}` } }, params.row.source_id)
        }
    },
    {
        'title': '设备类型',
        'key': 'type',
        width: 160,
    },
    {
        'title': '计费规则',
        'key': 'cost_rule',
        width: 260,
    },
    {
        'title': '时长',
        'key': 'time',
        width: 90,
    },
    {
        'title': '总价',
        'key': 'cost_total',
        width: 90,
    },
    {
        'title': '相关插座ID',
        'key': 'plugin_id',
        'width': 160,
    },
    {
        'title': '创建时间',
        'key': 'created_time',
        'width': 160,
        'sortable': true
    },
    {
        'title': '更新时间',
        'key': 'updated_time',
        'width': 160,
        'sortable': true
    },
    {
        'title': '地点',
        'key': 'location',
        'width': 160,
    },
    {
        title: '操作',
        key: 'action',
        width: 110,
        render: (h, params) => {
            return h('div', [
                h('Button', {
                    style: {
                        marginRight: '12px'
                    },
                    props: {
                        type: 'primary',
                        size: 'small'
                    }
                }, '导出')
            ]);
        }
    }
];
